
extern crate log;

#[cfg(test)]
mod test {
    use log::{trace, debug, info, warn, error};
    #[test]
    fn easy_use(){
        trace!("hello world");
        debug!("hello world");
        info!("hello world");
        warn!("hello world");
        error!("hello world");
        assert!(true);
    }

    use log::LevelFilter;


    #[test]
    fn env_logger_use(){
        fn env_logger_init(){
            let _ = env_logger::builder().filter_level(LevelFilter::Trace).is_test(true).try_init(); 
            //let _ = env_logger::builder().init();
        }

        env_logger_init();
        trace!("hello world");
        debug!("hello world");
        info!("hello world");
        warn!("hello world");
        error!("hello world");
        assert!(true);
    }
}
